<?php
function getCrulHeader($mod,$name) {
	global $objSDAO;
	$sSQL = "SELECT cr.*, m.description AS mdes " .
		" FROM com_rule cr " .
		" LEFT JOIN module m ON m.module = cr.module " .
		" WHERE cr.name = '".$name."' AND cr.module = '$mod'";
	$objSDAO->query($sSQL, "crulHead");
	$row = $objSDAO->fetch("crulHead");
	
	$sHtml = ("<table width=\"100%\" cellpadding=\"3\" cellspacing=\"2\">\n<tr>\n<td>\n");
	$sHtml .= ("<tr>" .
			"<td class=\"titl01\" width=\"15%\">Module</td>" .
			"<td class=\"text01\" width=\"85%\" style='font-weight:bold;'>".$row['module']." - ".$row['mdes']."</td>" .
		"</tr>\n");
	$sHtml .= ("<tr>" .
			"<td class=\"titl01\">Common Rule</td>" .
			"<td class=\"text01\" style='font-weight:bold;'>".$row['name']." - ".$row['description']."</td>" .
		"</tr>\n");
	$sHtml .= ("</table>\n");
	return $sHtml;
}
